package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

/**
 * 小美易融
 */
public class XiaoMeiYiRongUtil {


    public static String getshebao(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return "-2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb002.getValue(), shebao)) {
            return "2";
        }
        return "1";
    }


    public static String getGjj(String gongjijin) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gongjijin)) {
            return "-2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj002.getValue(), gongjijin)) {
            return "2";
        }
        return "1";
    }

    public static String getyuqi(String yuqi) {
        if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq001.getValue(), yuqi)) {
            return "1";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq002.getValue(), yuqi)) {
            return "2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq003.getValue(), yuqi)) {
            return "3";
        }
        return "4";
    }


    public static String getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return "-2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Car.car002.getValue(), car)) {
            return "1";
        }
        return "2";
    }


    public static String getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return "-2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.House.hu003.getValue(), house)) {
            return "2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.House.hu004.getValue(), house)) {
            return "2";
        }
        return "1";
    }




    public static String getbaodan(String baodan) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baodan)) {
            return "-2";
        }
        return "2";
    }

    public static String getGongZuo(String gongzuo) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz003.getValue(), gongzuo)) {
            return "8";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz001.getValue(), gongzuo)) {
            return "1";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(), gongzuo)) {
            return "6";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(), gongzuo)) {
            return "7";
        }
        return "9";
    }

    public static String getShouRu(String shouru) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr001.getValue(), shouru)) {
            return "1";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr002.getValue(), shouru)) {
            return "2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr003.getValue(), shouru)) {
            return "3";
        }
        return "5";
    }

    public static String getloanTime(String shouru) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt001.getValue(), shouru)) {
            return "1";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt002.getValue(), shouru)) {
            return "2";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt003.getValue(), shouru)) {
            return "3";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt004.getValue(), shouru)) {
            return "4";
        }
        return "-2";
    }


    public static Integer getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return 10000;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return 30000;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return 50000;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loan)) {
            return 100000;
        }
        return 200000;

    }


    public static String getZhimaScore(String zhima) {
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm005.getValue(), zhima)) {
            return "4";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm004.getValue(), zhima)) {
            return "3";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm003.getValue(), zhima)) {
            return "2";
        }
        return "1";
    }


}
